<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %> 
<%@ taglib uri="http://www.springframework.org/security/tags" prefix="sec" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

    <div id="container">    
        <div id="content" class="content"><div id="map" style="width:725px; height:408px; z-index: 0; background: #93b2d4; margin-left: 0;margin-right: 5px"></div></div>
	</div>

<script type="text/javascript">	
	
	//상세보기 팝업창 함수 & 위치찾아가기로직
	function showDetail(id,localeX, localeY){
		window.open("showDetail?id="+id,"showDetail","width=500, height=420, left=600, top=500, scroll=1, status=0, menubar=0, scrollbars=0, toolbar=0, directories=0, location=0, resizable=0");

		if(markers) markers.destroy();
		
		var lonlat = new OpenLayers.LonLat(localeX, localeY);
	
		markers = new OpenLayers.Layer.Markers("MarkersUp");
        map.addLayer(markers);

        var marker = new OpenLayers.Marker(lonlat, markerIcon(17, 28, 1));
       
        markers.addMarker(marker);		
        map.panTo(lonlat);
        searchEvent();
	};
</script>

<br/><br/>
<table width="725" border="0" cellspacing="0" cellpadding="0">
	<tr>
	<td>
		<div id="formBefore" style="visibility: show;">
	    	<table width="720px" border="0" cellpadding="0" cellspacing="0" align="left">
				<tr>
					<th width="100px" class="tdd6d7d6_top tdfffbff_bottom font12B_4f4f4f">사진</th><th width="80px" class="tdd6d7d6_top tdfffbff_bottom font12B_4f4f4f">아이디</th><th width="100px" class="tdd6d7d6_top tdfffbff_bottom font12B_4f4f4f">팔물건</th><th width="100px" class="tdd6d7d6_top tdfffbff_bottom font12B_4f4f4f">가격</th><th width="70px" class="tdd6d7d6_top tdfffbff_bottom font12B_4f4f4f">연락처</th><th width="200px" class="tdd6d7d6_top tdfffbff_bottom font12B_4f4f4f">내용</th>
				</tr>
				<c:forEach items="${umj_used_product}" var="li">
				<tr>
					<td align="center" height="28" class="line_e7e7e7 font11_7b797b"><img alt="" src="../../${li.productImage }"></td><td align="center" class="line_e7e7e7 font11_7b797b">${li.user_name }</td><td align="center" class="line_e7e7e7 font11_7b797b"><div id="showDetail" onclick="showDetail('${li.id}','${li.lat}','${li.lon}')" style="cursor: pointer">${li.productName }</div></td><td align="center" class="line_e7e7e7 font11_7b797b">${li.price }</td><td align="center" class="line_e7e7e7 font11_7b797b">${li.contactInfo }</td><td align="center" class="line_e7e7e7 font11_7b797b">${li.content }</td>
				</tr>
				</c:forEach>	
            </table>
		</div>
	</td>
	</tr>
</table>